﻿Imports System.Security.Cryptography
Imports System.Text

Public Class HashUtils

    Public Shared Function Hash(ByVal input As String) As String
        Dim encoding As UnicodeEncoding = New UnicodeEncoding()
        Dim buffer() As Byte = encoding.GetBytes(input)
        Dim sha1Func As SHA1CryptoServiceProvider = New SHA1CryptoServiceProvider()
        Dim msgDigits() As Byte = sha1Func.ComputeHash(buffer)

        Return BitConverter.ToString(msgDigits).Replace("-", String.Empty)
    End Function

End Class
